import Vue from 'vue'
export function fetchEctranceLists(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/findOfferList.do', opts)
}

export function fetchEctranceDetailInfo(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/findOfferById.do', {
        id: opts.id
    });
}

// 获取入场字段信息
export function findAdmitField(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/findAdmitField.do', opts);
}
// * 报道地点
export function fetchWorkCityForPlace(opts){
  return Vue.axios.post('/supplierBusinessAdmit/findWorkCityForPlace.do', opts)
}

// 入场部门
export function findAdmitDept(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/findAdmitDept.do', opts);
}

// 入场供应商
export function findAdmitSupplier(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/findAdmitSupplier.do', opts);
}

// 汇报对象
export function findReportObject(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/findReportObject.do', opts);
}

// 交接人
export function findLeaveReportObject(opts) {
    return Vue.axios.post('/user/list.do', opts);
}

// 修改入场状态
export function modifyAdmit(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/modifyAdmit.do', opts);
}

// 修改入场状态
export function addEctranceDetailInfo(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/createAdmit.do', opts)
}

// 查询入场申请详情
export function findAdmitDetail(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/findAdmitDetail.do', opts);
}

// 证件照片
export function showFile(opts) {
    return Vue.axios.post('/supplierBusinessAdmit/showFile.do', opts, { responseType: 'blob' });
}

// 添加离场信息
export function createSelective(opts) {
    return Vue.axios.post('/outsourcerToOut/createSelective.do', opts);
}

// 查询离场人员信息
export function findOutUser(opts) {
    return Vue.axios.post('/outsourcerToOut/findOutUser.do', opts);
}
